package org.frog.sgs.card.general.sex;


/**
 * @author duanxiangqi
 * @date 2012-10-29
 */
public enum Sex {
	boy(1, "男"), girl(2, "女");

	private int value;

	private String name;

	private Sex(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public static Sex get(int type) {
		for (Sex sex : Sex.values()) {
			if (sex.getValue() == type) {
				return sex;
			}
		}
		return null;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
